<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery.min.js"></script>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    </style>
</head>

<body>
    <!-- <script>
        等着页面DOM加载完毕再去执行js代码
        1 入口函数
        $(document).ready(function() {
                $('div').hide();
            })
            2
            $(function() {
                $('div').hide();
                // alert(11)
            });
     </script> -->

    <div></div>
    <script>
        $('div').hide();
    </script>
</body>

</html>